class Student {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    sayhi() {

        console.log(
            `姓名，${this.name}, 年龄,${this.age}`
        );

    }
}

const zby = new Student('zby', 22);
console.log(zby.name);
console.log(zby.age);
zby.sayhi();